<template>
  <div>
    <el-table :data="list" border stipe>
      <el-table-column prop="name" label="用户名"> </el-table-column>
      <el-table-column prop="age" label="年龄"> </el-table-column>
    </el-table>
  </div>
</template>

<script>
import axios from "axios";

export default {
  name: "App",
  data() {
    return {
      list: [],
    };
  },
  created() {
    this.get_user_list();
  },
  methods: {
    get_user_list() {
      axios.get("/getUser").then((res) => {
        this.list = res.data.data;
        console.log("res", this.list);
      });
    },
  },
};
</script>

<style>
</style>
